package org.tangolyricstagger.model;

import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Setter;

import org.apache.commons.lang.builder.CompareToBuilder;

@Getter
@Setter
@RequiredArgsConstructor
public class MatchResult implements Comparable<MatchResult> {
	private final String originalTitle;
	private final String candidateTitle;
	private final TagInfo tagInfo;
	private final String matchedTitle;
	private final float similarity;
	private final boolean matched;
	private String todoTangoTitle;
	private String lyrics;

	public boolean isLyricsFound() {
		return lyrics != null;
	}

	@Override
	public int compareTo(MatchResult o) {
		return new CompareToBuilder().append(similarity, o.getSimilarity()).toComparison();
	}
}
